<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width:400px;
            height:400px;
            background-color:#ffff00;
        }
        .box2{
            width:600px;
            height:600px;
           background-image:url("https://c-ssl.dtstatic.com/uploads/blog/202209/05/20220905215638_b24b7.thumb.1000_0.jpg");
            /* background-image:url("https://c-ssl.duitang.com/uploads/blog/202211/26/20221126003832_424d5.jpeg") */
            background-repeat:no-repeat;
            /* background-size:50% 50%; */
            /* background-size:contain; */
            background-position: center center;
        }

    </style>
</head>
<body>
    <!-- div是块级元素，上下排列 -->
    <!-- <div class="box1"></div> -->
    <div class="box2"></div>
</body>
</html>